package Demo1;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 34255
 * Date: 2024-05-15
 * Time: 20:59
 */
public final class Cat extends Animal{
    public Cat(String name, int age, String gender) {
        super(name, age, gender);
        System.out.println("Cat.构造方法执行中......");
    }

    static{
        System.out.println("Cat.静态代码块执行中......");
    }

    {
        System.out.println("Cat.实力代码块执行中......");
    }

    public void mimi(){
        System.out.println(name + " 正在喵喵叫!");
    }

    public Cat(){

    }

    @Override
    public String toString() {
        return "Cat{" +
                "name='" + name + '\'' +
                ", age=" + age +
                ", gender='" + gender + '\'' +
                '}';
    }

}
